package com.tjnu.losca.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tjnu.losca.pojo.Img;
import com.tjnu.losca.mapper.ImgMapper;
import com.tjnu.losca.service.IImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author losca
 * @since 2021-09-27
 */
@Service
public class ImgServiceImpl extends ServiceImpl<ImgMapper, Img> implements IImgService {

    @Override
    public Img getOne(String md5,long size,String suffix) {
        QueryWrapper<Img> wrapper = new QueryWrapper<>();
        wrapper.eq("md5",md5)
                .eq("size",size)
                .eq("suffix",suffix);
        return this.getOne(wrapper);
    }
}
